﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LapvWebComponent;

namespace LapvWebM.Pages
{
    public partial class NewsDetail : System.Web.UI.Page
    {
        public int id = 0;
        public string url="";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["id"] != null) {
                int.TryParse(Request.Params["id"], out id);
            }
            using (lapvwebEntities db=new lapvwebEntities())
            {
                news n = db.news.Where(en => en.id == id ).FirstOrDefault();
                Literal1.Text = "<div data-role=\"collapsible\" data-theme=\"a\" data-content-theme=\"a\" data-collapsed=\"false\" class=\"content_new\">"
                                   + "<h3>" + n.title + "</h3>"
                                   + "<p>" + n.content + "</p>"
                                + "</div>";

                
            } 

        }
    }
}